<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加后台菜单</title>
<link href="/Public/ui/css/default.css" rel="stylesheet" type="text/css">
<link href="/Public/css/base.css" rel="stylesheet" type="text/css">
<style>
body {
	background: #fff;
}
</style>
<script language="javascript" type="text/javascript" src="/dadaocms/Public/js/jquery-1.8.0.min.js"></script>
<script>
$(function(){
	
	/*
	* 点击展开子类
	*
	*/
	$(".jia").click(function(){
		if($(this).parent("td").parent("tr").next(".seed").is(":hidden")){
			$(this).parent("td").parent("tr").next(".seed").show();
			$(this).html("-");
		}else{
			$(this).parent("td").parent("tr").next(".seed").hide();
			$(this).html("+");	
		}
		
	});
	
	$(".seed").prev(".fid").find("td").find("span.jia").html("-");
	
	/*
	* 点击关闭所有子类
	*
	*/
	$("#closeseed").click(function(){
		if($(this).val() == "展开所有子类"){
			$(".seed").show();
			$(this).val("关闭所有子类");
			$.each($(".jia"),function(k,v){
				if($(this).html()){
					$(this).html("-");
				}
			});						
		}else{
			$(".seed").hide();
			$(this).val("展开所有子类");
			$.each($(".jia"),function(k,v){
				if($(this).html()){
					$(this).html("+");
				}
			});		
		}		
	});
	
	/*
	* JS的in_array函数
	*/
	Array.prototype.in_array = function(e) 
	{ 
		for(i=0;i<this.length;i++)
		{
			if(this[i] == e)
			return true;
		}
		return false;
	}
	
	/*
	* 选中用户组权限
	*/
	var s = "{$list.sys}";
	var sys = s.split(",");
	$(".sys").each(function(k, v) {
       if(sys.in_array(v.value)){
			$("#"+v.value).attr('checked',true);
		}
    });
	
	
	
});
</script>
</head>
<body topmargin="8">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="65%" height="30"><IMG height=14 src="/dadaocms/Public/images/frame/book1.gif" width=20>&nbsp;<a href="__URL__/index"><u>用户组管理</u></a> -&gt; 用户组修改</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" >
  <tr>
    <td><table border="0" cellpadding="0" cellspacing="0">
        <tr id="mytab">
          <td width="84" style="cursor:pointer" align="center" id="config_2" background="/Public/images/frame/itemnote2.gif"><strong>数据编辑</strong></td>
          <td></td>
        </tr>
      </table></td>
  </tr>
</table>
<form name="form1" id="form1" action="__URL__/sysgroup_update" enctype="multipart/form-data" method="post">
  <input name="id" type="hidden" id="id" style="width:150px" value="{$list.id}" />
  <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="edit" style="border:1px solid #cfcfcf;background:#ffffff;">
    <tr>
      <td class="bline"><table width="100%" class="mytable">
          <tr class="bline">
            <td width="14%">&nbsp;用户组名称：</td>
            <td width='86%'><input name="name" type="text" id="name" style="width:150px" value="{$list.name}" /></td>
          </tr>
          <tr class="bline">
            <td width="14%">&nbsp;用户组权限：</td>
            <td width='86%'>
                <table>
                <php>
                if($jiedian){JiedianGroupTree($jiedian);}    
                </php>
                </table>
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
  <!-- //高级参数 -->
  
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9FCEF" style="border:1px solid #cfcfcf;border-top:none;">
    <tr>
      <td height="35"><table width="100%" border="0" cellspacing="1" cellpadding="1">
          <tr>
            <td width="17%">&nbsp;</td>
            <td width="83%"><table width="214" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="115"><input name="imageField" type="image" src="/dadaocms/Public/images/frame/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer"></td>
                  <td width="99"><img src="/dadaocms/Public/images/frame/button_close.gif" width="60" height="22" border="0" onClick="window.opener.location.reload();window.close();" style="cursor:pointer"></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>